#import "UpliftUnfoldController.h"
        
#import "UpliftUnfoldModel.h"
#import "UpliftUnfoldCell.h"
#import "Masonry.h"

@interface UpliftUnfoldController () <UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, strong) UITableView *yearlingGlimmerQuestTableView;
@property (nonatomic, strong) NSMutableArray *oasisArtistryPrismArray;

@end

@implementation UpliftUnfoldController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self quakeInvincibleJeopardySetuplayout];
	[self noodlefetchData];
}


//: 懒加载数据模型数组
- (NSMutableArray *)oasisArtistryPrismArray {
	if (!_oasisArtistryPrismArray) {
		_oasisArtistryPrismArray = [NSMutableArray array];
	}
	return _oasisArtistryPrismArray;
}

- (UITableView *)figHandleTableView {
    if (!_yearlingGlimmerQuestTableView) {
        _yearlingGlimmerQuestTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
        _yearlingGlimmerQuestTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
        _yearlingGlimmerQuestTableView.estimatedRowHeight = 0;
        _yearlingGlimmerQuestTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
        _yearlingGlimmerQuestTableView.contentInset = UIEdgeInsetsMake(16, 0, 16, 0);
        _yearlingGlimmerQuestTableView.delegate = self;
        _yearlingGlimmerQuestTableView.dataSource = self;
        _yearlingGlimmerQuestTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
        _yearlingGlimmerQuestTableView.showsVerticalScrollIndicator = NO;
        _yearlingGlimmerQuestTableView.showsHorizontalScrollIndicator = NO;
        _yearlingGlimmerQuestTableView.backgroundColor = UIColor.clearColor;
    }
    return _yearlingGlimmerQuestTableView;
}

//: 初始化页面UI
- (void)quakeInvincibleJeopardySetuplayout {

	[self.view addSubview:self.yearlingGlimmerQuestTableView];
	[self.yearlingGlimmerQuestTableView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.leading.trailing.equalTo(self.view);
		make.top.equalTo(self.view);
		make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
	}];
}


//: 获取数据模型
- (void)noodlefetchData {
	
}

#pragma mark - UITableView DataSource 
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.oasisArtistryPrismArray.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UpliftUnfoldCell *pathway = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([UpliftUnfoldCell class])];
    if (pathway == nil) {
        pathway = [[UpliftUnfoldCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:NSStringFromClass([UpliftUnfoldCell class])];
    }
    pathway.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return pathway;
}


#pragma mark - UITableView Delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // cell tap action
}


@end
